In accordance with one embodiment of the present invention, a method for encoding data is presented comprising receiving a stream of data to be encoded comprising a plurality of frames, selecting a frame-type for each of the plurality of frames, and grouping subsets of the plurality of frames based, at least in part, on the selected frame type to facilitate random access to select groups of frames, and to facilitate motion estimation.